@extends('user.base')
@section('content-header','Search Result')
@section('content-body')
<section class="content">
	<div class="container col-md-9 col-xs-9">		
		<hr />
		@foreach($caselist as $case)
		<div class="media">
			<a class="pull-left" href="{{ URL('patient/patient/'.$case->patient_id.'/case/'.$case->id.'/edit')}}">
				<img class="media-object" src="{{ App\PictureInfo::cover($case->id)}}" width="180px" height="140px" alt="No photo yet">
			</a>
			<div class="media-body">
				<h4 class="media-heading">
					<strong>Created:</strong><span>{{ $case->created_at}}</span>
				</h4>
				<div style="padding-top: 10px;">
					<strong>Case Description:</strong>{{ $case->description }}
				</div>
				<div style="padding-top: 50px;">
					<form action="{{ URL('case/info/'.$case->id )}}" method="POST" style="display:inline">
						<input type="hidden" name="_token" value="{{ csrf_token()}}">
						<input type="hidden" name="_method" value="DELETE">
						<button type="submit" class="btn btn-danger">
							Delete
						</button>
					</form>
					<a href="{{ URL('patient/patient/'.$case->patient_id.'/case/'.$case->id.'/edit')}}"  class="btn btn-large btn-success">
						Edit
					</a>
				</div>
			</div>
		</div>
		<hr />
		@endforeach
	</div>
</section>
@endsection
@section('js')
@endsection
